/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Prestahop_retrievement;

import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author strokyl
 */
@Embeddable
public class PsCountryLangPK implements Serializable {
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_country", nullable=false)
    private PsCountry country;

    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_lang", nullable=false)
    private PsLang lang;

    public PsCountryLangPK() {
    }

    public PsCountryLangPK(PsCountry country, PsLang lang) {
        this.country = country;
        this.lang = lang;
    }

    public PsCountry getCountry() {
        return country;
    }

    public void setCountry(PsCountry country) {
        this.country = country;
    }

    public PsLang getLang() {
        return lang;
    }

    public void setLang(PsLang lang) {
        this.lang = lang;
    }


    @Override
    public String toString() {
        return "hibernate.PsCountryLangPK[country=" + country + ", lang=" + lang + "]";
    }

}
